<?php

 $area = $_REQUEST["area"];
 $section = $_REQUEST["section"];
 $module = "{$_SERVER["DOCUMENT_ROOT"]}/modules/section_header/templates";
 //$filename = basename(substr ("{$_REQUEST["image"]}",0,strpos("{$_REQUEST["image"]}",".")) . ".html");
 $filename = "{$module}/{$area}/{$section}/images/banner/text.html";
 
 $data = $_REQUEST["html"];
 
 if (file_put_contents($filename, $data)) echo "success";
 else echo "unable to save:\n{$data}\n$filename\n{$_REQUEST["image"]}";
?>

